#ifndef __LIGHT_H__
#define __LIGHT_H__
#include "common.h"
typedef enum {
    LIGHT_OFF,
    LIGHT_ON,
}Light_state;

typedef int(*light_on_fn_t)(void *self);
typedef int(*light_off_fn_t)(void *self);
typedef int(*light_get_state_fn_t)(void *self, int *state);

typedef struct Light_i {    // light interface
    light_on_fn_t on;
    light_off_fn_t off;
    light_get_state_fn_t get_state;
} Light_i;


int light_on(void *self);
int light_off(void *self);
int light_get_state(void *self, int *state);


#endif
